import React from 'react';
import { Button, Checkbox, Form, Input } from 'antd';


const onFinishFailed = (errorInfo: any) => {
    console.log('Failed:', errorInfo);
};

interface IFormProps {
    getVisitorList: (params:object) => void
}

const FormOption: React.FC<IFormProps> = ({ getVisitorList }) => {
    const onFinish = (values: any) => {
        console.log('Success:', values);
        getVisitorList(values)
    };

    return (
        <Form
            name="visitor"
            labelCol={{ span: 6 }}
            wrapperCol={{ span: 18 }}
            // style={{ maxWidth: 600 }}
            onFinish={onFinish}
            onFinishFailed={onFinishFailed}
            autoComplete="off"
        >
            <Form.Item
                label="机构名称"
                name="chain_name"
            >
                <Input />
            </Form.Item>
            <Form.Item>
                <Button type="primary" htmlType="submit">
                    查询
                </Button>
            </Form.Item>
        </Form>
    )
};

export default FormOption;